home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Demos / Bowers Development / AppMaker 2.0b5 / Examples / ODF / AMSample / Sources / Part.h < prev    next >
Encoding:
Text File  |  1996-06-03  |  2.5 KB  |  102 lines  |  [TEXT/CWIE]

  1. //========================================================================================
  2. //
  3. //    File:                Part.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef PART_H
  11. #define PART_H
  12.  
  13. #ifndef DEFINES_K
  14. #include "Defines.k"
  15. #endif
  16.  
  17. // ----- Framework Includes -----
  18.  
  19. #ifndef FWPART_H
  20. #include "FWPart.h"
  21. #endif
  22.  
  23. // ----- OS Layer -----
  24.  
  25. #ifndef FWRESFIL_H
  26. #include "FWResFil.h"
  27. #endif
  28.  
  29. // ----- Foundation Layer -----
  30.  
  31. #ifndef FWSTDDEF_H
  32. #include "FWStdDef.h"
  33. #endif
  34.  
  35. #ifndef FWBNDSTR_H
  36. #include "FWBndStr.h"
  37. #endif
  38.  
  39.  
  40. //========================================================================================
  41. // Forward Declarations
  42. //========================================================================================
  43.  
  44. class CAMSampleContent;
  45.  
  46. //========================================================================================
  47. // CAMSamplePart
  48. //========================================================================================
  49.  
  50. class CAMSamplePart : public FW_CPart
  51. {
  52. //----------------------------------------------------------------------------------------
  53. //    Initialization/Destruction
  54. //
  55. public:
  56.  
  57.     FW_DECLARE_AUTO(CAMSamplePart)
  58.  
  59.     CAMSamplePart(ODPart* odPart);
  60.     virtual ~CAMSamplePart();
  61.  
  62.     virtual void Initialize(Environment* ev);
  63.  
  64. //----------------------------------------------------------------------------------------
  65. //    Inherited API
  66. //
  67. public:
  68.     virtual FW_CContent*    NewPartContent(Environment* ev);
  69.  
  70.     virtual FW_CFrame*        NewFrame(Environment* ev,
  71.                                     ODFrame* odFrame,
  72.                                     FW_CPresentation* presentation,
  73.                                     FW_Boolean fromStorage);
  74.  
  75.     virtual FW_Boolean        DoAdjustMenus(Environment* ev,
  76.                                     FW_CMenuBar* menuBar, 
  77.                                     FW_Boolean hasMenuFocus,
  78.                                     FW_Boolean isRoot);
  79.  
  80.     virtual FW_Boolean        DoMenu(Environment* ev,
  81.                                     const FW_CMenuEvent& theMenuEvent);
  82.  
  83. //----------------------------------------------------------------------------------------
  84. //    New API
  85. //
  86. public:
  87.     void                 DoAMSampleCommand(Environment* ev, ODCommandID id);
  88.         // Handle our two menu commands, cFirstCommand and cSecondCommand
  89.  
  90.     void                PartChanged(Environment* ev);
  91.         // Call this after changing part data, to notify the proper authorities
  92.  
  93. //----------------------------------------------------------------------------------------
  94. //    Data Members
  95. //
  96. private:
  97.     CAMSampleContent*            fPartContent;
  98.     FW_CPresentation*    fMainPresentation;
  99. };
  100.  
  101. #endif
  102.